package com.frejoys.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.frejoys.dao.entity.PlatformWalletLog;

import java.math.BigDecimal;

public interface PlatformWalletLogService extends IService<PlatformWalletLog> {

    default PlatformWalletLog getOnly(QueryWrapper<PlatformWalletLog> wrapper) {
        wrapper.last("limit 1");
        return this.getOne(wrapper);
    }

    default PlatformWalletLog getOnly(LambdaQueryWrapper<PlatformWalletLog> wrapper) {
        wrapper.last("limit 1");
        return this.getOne(wrapper);
    }

    boolean addInfo(Integer agentRoleGroupId, BigDecimal money, Long drawSn, Integer type, Integer createTime);

}
